<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>{% block title %}{% endblock %}</title>
    <link rel="stylesheet" href="{% static 'bootstrap/css/bootstrap.css' %}">
    <script src="{% static 'bootstrap/js/bootstrap.js' %}"></script>
    <script src="{% static 'bootstrap/js/bootstrap.bundle.js' %}"></script>
    <script src="{% static 'bootstrap/js/jquery-3.7.1.min.js' %}"></script>

    <link rel="stylesheet" href="{% static 'bootstrap/css/base.css' %}">
    <link rel="stylesheet" href="{% static 'bootstrap/css/bootstrap.min.css' %}">
    {% block header %}{% endblock %}
</head>
<body>
<div class="container">
    <header class="d-flex text-bg-light flex-wrap justify-content-center py-3 mb-4 border">
        <a href="/" class="d-flex align-items-center mb-3 mb-md-0 me-md-auto text-dark text-decoration-none">
            <svg class="bi me-2" width="40" height="32">
                <use xlink:href="#bootstrap"></use>
            </svg>
            <span class="fs-4">篮球教学论坛</span>
        </a>
        <ul class="nav nav-pills">
            <li class="nav-item"><a href="/" class="nav-link" aria-current="page">主页</a></li>
            {% if user.is_authenticated %}
                <li class="nav-item"><a href="/blog/publish/" class="nav-link">发布信息</a></li>
                <li class="nav-item"><a href="/blog/list/" class="nav-link">管理论坛</a></li>
                <div class="dropdown">
                    <a class="btn btn-link d-inline-flex align-items-center dropdown-toggle"  role="button"
                       data-bs-toggle="dropdown" aria-expanded="false">
                        <img class="avatar-img" src="{% static 'covers/0acaaaf0-17df-4f57-a312-cbb867e12442.jpg' %}"
                             width="50px" height="50px">
                    </a>
                    <ul class="dropdown-menu">
                        <li><a class="dropdown-item" href="/logout">退出登录</a></li>
                    </ul>
                </div>
            {% else %}
                <li class="nav-item"><a href="/login/" class="nav-link">登录</a></li>
                <li class="nav-item"><a href="/registry/" class="nav-link">注册</a></li>
            {% endif %}

        </ul>
    </header>
</div>


<div class="container p-2 border rounded-4">
    {% block body %}{% endblock %}
</div>

</body>
</html>